import { Injectable } from '@nestjs/common';
import {CatalogEntity} from './catalog.entity';
import {InjectRepository} from '@nestjs/typeorm';
import {Repository}  from 'typeorm'

@Injectable()
export class CatalogService {
    constructor(
        @InjectRepository(CatalogEntity)
        private readonly catalogRepository: Repository<CatalogEntity>
    ){}

    findList (bookId) {
        return this.catalogRepository.find({bookId: bookId})
    }
}
